package hz.mobileproject.pda.ui.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.google.gson.Gson;

import org.xutils.x;

/**
 * Created by Lc on 2018/1/29.
 */

public abstract class BaseFragmentActivity extends AppCompatActivity {
    protected Gson mGson;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        mGson = new Gson();
        initData();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    public abstract void initData();


    protected void recreateActivityAndRefresh(){
        recreate();
        getWindow().getDecorView().invalidate();
    }
}
